package com.xbongbong.pro.process.pojo.dto;

import com.xbongbong.paas.domain.entity.PaasFormDataEntity;
import com.xbongbong.paas.pojo.dto.FormDataAddDTO;
import com.xbongbong.paas.pojo.dto.FormDataUpdateDTO;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author 吴峰
 * @date 2022/07/19 16:02
 */
@Setter
@Getter
@ToString
public class ProcessSaveDataDTO extends BaseDTO {

    private static final long serialVersionUID = 3716234828354533360L;


    private FormDataAddDTO formDataAddDTO;

    private FormDataUpdateDTO formDataUpdateDTO;

    private PaasFormDataEntity paasFormDataEntity;



    private PaasFormDataEntity oldFormData;

    public ProcessSaveDataDTO() {
    }

    public ProcessSaveDataDTO(FormDataAddDTO formDataAddDTO, PaasFormDataEntity paasFormDataEntity, String platform, UserVO loginUserVo) {
        this.formDataAddDTO = formDataAddDTO;
        this.paasFormDataEntity = paasFormDataEntity;
        setPlatform(platform);
        setLoginUser(loginUserVo);
        setUserId(loginUserVo.getUserId());
        setCorpid(loginUserVo.getCorpid());
    }

    public ProcessSaveDataDTO(FormDataUpdateDTO formDataUpdateDTO, PaasFormDataEntity paasFormDataEntity,PaasFormDataEntity oldFormData, String platform, UserVO loginUserVo) {
        this.formDataUpdateDTO = formDataUpdateDTO;
        this.paasFormDataEntity = paasFormDataEntity;
        this.oldFormData = oldFormData;
        setPlatform(platform);
        setLoginUser(loginUserVo);
        setUserId(loginUserVo.getUserId());
        setCorpid(loginUserVo.getCorpid());
    }
}
